<div class="container">
  <form [formGroup]="form" (submit)="onSubmit(form,$event)">
    <h2 mat-dialog-title>{{title}}</h2>
    <div mat-dialog-content>
      <mat-form-field class="example-full-width" color="primary">
        <input matInput placeholder="任务内容" formControlName="desc">
      </mat-form-field>
      <mat-radio-group formControlName="priority">
        <mat-radio-button *ngFor="let priority of priorities" [value]="priority.value" >
           {{priority.label}}
        </mat-radio-button>
      </mat-radio-group>
      <div class="chips-margin-top">
          <app-chips-list [label]="'更改执行者'" [multiple]="true" formControlName="owner" ></app-chips-list>
      </div>
      <mat-form-field class="example-full-width" color="primary">
        <input matInput placeholder="任务截止日期" [matDatepicker]="dueDatepicker" formControlName="dueDate">
        <mat-datepicker-toggle matSuffix [for]="dueDatepicker"></mat-datepicker-toggle>
        <mat-datepicker #dueDatepicker></mat-datepicker>
      </mat-form-field>
      <mat-form-field class="example-full-width" color="primary">
        <input matInput placeholder="提醒日期" [matDatepicker]="reminderDatepicker" formControlName="reminder">
        <mat-datepicker-toggle matSuffix [for]="reminderDatepicker"></mat-datepicker-toggle>
        <mat-datepicker #reminderDatepicker></mat-datepicker>
      </mat-form-field>
      <div>
        <app-chips-list [label]="'更改参与者'" [multiple]="true" formControlName="followers" ></app-chips-list>
      </div>
      <mat-form-field class="example-full-width">
        <textarea matInput placeholder="备注" formControlName="remark"></textarea>
      </mat-form-field> 
    </div>
    <div mat-dialog-actions class="footer-padding-bottom">
      <button type="submit" mat-raised-button color="primary"[disabled]="!form.valid">保存</button>
      <button type="button" mat-button mat-dialog-close>关闭</button>
    </div>
  </form>
</div>

